import math
inp=input().split(' ')
a=float(inp[0])
b=float(inp[1])
n=int(inp[2])

def fun(x):
    return math.sqrt(4-math.sin(x)**2)
def complex_simpson(a,b,n):

    sum=0
    h=(b-a)/n
    sum+=fun(a)+fun(b)

    for i in range(1,n):
        sum+=2*fun(a+i*h)

    for i in range(1,n+1):
        sum+=4*fun(a+i*h-h/2)

    sum*=h/6

    return sum

print("%.7f"%complex_simpson(a,b,n))
